@import 'partials/variables';

body {
    // Prevent iPhone from rendering huge text when the page is scaled way down
    -webkit-text-size-adjust: none;
}

// You shall not click!
a[href] {
    cursor: not-allowed;
}

// All regions
[data-postleaf-type="post-content"],
[data-postleaf-type="post-title"] {
    min-height: 1em; // don't disappear when empty
    transition: $postleaf-transition-speed outline-color;
    outline: dashed 2px transparent;
    outline-offset: 8px;
    &:hover {
        outline-color: rgba(black, .25);
    }
    &:focus {
        outline-color: rgba(black, .5);
    }
    a[href] {
        cursor: text;
    }
}

// Post title regions
[data-postleaf-type="post-title"] {
    // Prevent empty regions from disappearing
    min-width: 1em;
    display: inline-block;
}

// Embeds
[data-embed] {
    position: relative !important;
    // Create an invisible overlay on top of embedded elements to disable interaction
    &:after {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        content: '';
        background: $brand-primary;
        opacity: 0;
        cursor: text;
    }
    // Highlight the embed when selected
    &[data-mce-selected]:after {
        opacity: .25;
    }
}

// Hide the ghost container when dragging embeds
.mce-drag-container {
    display: none !important;
}

// Image selections
img[data-mce-selected] {
    outline: none !important;
}

// HT selections
hr[data-mce-selected] {
    outline: dotted 1px black;
}